Apply best available single category modules by default#622
Apply best available single category modules by default#622craig-johnston wants to merge 9 commits intoYafc-CE:masterfrom
Conversation
…efault modules based on the milestones that are unlocked.
veger
left a comment
There was a problem hiding this comment.
Code looks good to me.
I do wonder if we need to check some other mod packs to see if they are not broken by this, as we do not know how their modules work? (At least I do not... 😉)
|
I've tested briefly space age; it does nothing, as expected. |
|
I was indeed thinking about angels/bobs, as they introduce some new modules (at least back when I played them). I do not have a lot of experience with mod suites, so I do not have a list of which made changes to modules unfortunately. If there are no others, we cannot test, and a (quick) angels/bobs is all that can be done... |
|
Quick Angels/bobs test shows no conflict, it doesn't pick anything for the modules, same as space age. |
Co-authored-by: Copilot <copilot@github.com>
…lock which is a bit py specific Co-authored-by: Copilot <copilot@github.com>
If no modules are set and the building takes special modules, apply default modules based on the milestones that are unlocked.
This is a QOL change for Py players in particular.
Adding recipe to create 1/s moss in existing YAFC:

Same action with this PR:

And example using Wood processing TURD at py3 - Saw blade 2 auto-selected:

This is a single function addition to calculate and apply the best module, so fairly isolated.
I've tested using Py mods.
As per comment in the code, I did not do a secondary sort. If two modules are unlocked at the same milestone, it'll just pick one for simplicity. If/when this case comes up there will be more info about which secondary sort option to take rather than guessing now and making the code more complex.